<?php 
    class Categorys extends CI_Model{

        function __construct(){
            parent::__construct();
        }

        function get_category_data(){
            $sql = "SELECT id, name FROM {$this->db->dbprefix}tk_categorys WHERE (school_id = 0) AND status = 1";
            $result = $this->db->query($sql)->result_array();
            return $result;
        }
    }